/*
 * @Description: 
 * @Author: changqing
 * @Date: 2021-08-30 16:35:27
 * @LastEditTime: 2021-08-30 16:37:51
 * @LastEditors: changqing
 * @Usage: 
 */

var { timer, interval,range,from } = require('rxjs'); 
var {distinct,map} = require('rxjs/operators');

from([1, 2, 3, 3, 2, 1, 4, 5])
  .pipe(distinct())
  .subscribe(data => {
    console.log(`${data}`);
  });
 // 1 2 3 4 5